package com.xuecheng.publish.listener;

import com.xuecheng.common.util.JsonUtil;
import com.xuecheng.publish.entity.CoursePubMsg;
import com.xuecheng.publish.service.CoursePubService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <p></p>
 *
 * @Description:
 */
@Slf4j
@Component
public class PublishPageConsumer {

    @Autowired
    private CoursePubService coursePubService;


    /*
    * # 课程发布 交换机名称
        course.publish.exchange = course_pub.direct
        # 课程发布 页面生成队列名称
        course.publish.queue = course_page.queue
        course.publish.routingkey= publish.course
    * */
    public void publishPage(String jsonString) {

        // 1.接受json消息并解析为对象
        // 2.调用 coursePubService publishPage方法 完成本地事务操作

    }


}
